Release 10.1A: OpenEdge Application Server:
Developing AppServer Applications


Progress 4GL for programming AppServer procedures

Table 2–1 lists the Progress 4GL elements that are either valid only in an AppServer session or have special application in AppServer programming. The remaining sections in this chapter explain how to use these elements.

Table 2–1: Progress 4GL for programming AppServer procedures
Progress 4GL element
Description
DEFAULT-COMMIT 
A LOGICAL attribute on a transaction object handle that specifies how the transaction object is to complete the transaction if an automatic transaction terminates with no prior SET-COMMIT( ) or SET-ROLLBACK( ) being invoked.
DELETE OBJECT handle 
A statement that you can use to delete certain session objects, including local and remote persistent procedures.
DELETE PROCEDURE
   procedure-handle 
A statement that you can use to delete both local and remote procedure objects (persistent procedures).
EXPORT ( [ list ] ) 
A method on the SESSION system handle that creates and modifies the list of remote procedures provided by the AppServer.
FUNCTION ... IN SUPER 
A statement that specifies the prototype definition for a user-defined function defined within a super procedure.
IS-OPEN 
A LOGICAL attribute on a transaction object handle that returns TRUE if a database transaction is active. This is identical to the Progress 4GL TRANSACTION function.
PERSISTENT 
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running persistently as a procedure object.
PROCEDURE ... IN SUPER 
A statement that begins the prototype definition for an internal procedure defined within a super procedure.
REMOTE 
A LOGICAL attribute on the SESSION system handle that is TRUE if the current session is running in the context of an AppServer.
A LOGICAL attribute on procedure handles and the THIS-PROCEDURE system handle that is TRUE if the specified procedure is running at the top level in the context of an AppServer (as the result of a remote procedure call by a client application). Always FALSE if PROXY is TRUE.
SERVER-CONNECTION-
BOUND 
A LOGICAL attribute on the SESSION system handle that is TRUE if the AppServer agent is bound to a particular client session in stateless and state-free operating modes by client invocation of a remote persistent procedure or Open Client/Web service ProcObject. By default, it is FALSE. Valid only if the REMOTE attribute is TRUE.
SERVER-CONNECTION-
BOUND-REQUEST 
A LOGICAL attribute on the SESSION system handle that, when set to TRUE, requests that the AppServer agent be bound to the current client connection identified by the SERVER-CONNECTION-ID attribute. When set to FALSE, requests that the AppServer agent be unbound from the currently bound client connection pending deletion of all remote persistent procedures running in the session. Valid only if the REMOTE attribute is TRUE and the operating mode is stateless.
In state-free operating mode, any attempt to set this attribute raises a WARNING condition in the AppServer agent, which writes a message to the AppServer log file, and the value remains unchanged. You can handle the WARNING condition by including the NO-ERROR option in the statement that attempts to set the value, and checking ERROR-STATUS:NUM-MESSAGES for a value greater than zero. In state-free operating mode, this attribute always has the Unknown value (?).
SERVER-CONNECTION-
CONTEXT 
A CHARACTER attribute on the SESSION system handle that contains an application-determined value that you can set. OpenEdge passes this value to each AppServer agent that executes a request on behalf of the client connection identified by the SERVER-CONNECTION-ID attribute. Valid only if the REMOTE attribute is TRUE.
In state-free operating mode, any attempt to set this attribute raises a WARNING condition in the AppServer agent, which writes a message to the AppServer log file, and the value remains unchanged. You can handle the WARNING condition by including the NO-ERROR option in the statement that attempts to set the value, and checking ERROR-STATUS:NUM-MESSAGES for a value greater than zero. In state-free operating mode, this attribute always has the Unknown value (?).
SERVER-CONNECTION-ID 
A CHARACTER attribute on the SESSION system handle that returns the run-time connection ID of the current client connection assigned to this AppServer session. Valid only if the REMOTE attribute is TRUE.
In state-free operating mode, this value has no meaning.
SERVER-OPERATING-MODE 
A CHARACTER attribute on the SESSION system handle that returns the operating mode specified by the operatingMode property set for this AppServer in the ubroker.properties file. Valid only if the REMOTE attribute is TRUE.
SET-COMMIT( ) 
A method on a transaction object handle that tells the transaction object to commit any automatic transaction when the current request completes and returns execution to the client.
SET-ROLLBACK( ) 
A method on a transaction object handle that tells the transaction object to roll back any automatic transaction when the current request completes and returns execution to the client.
TRANSACTION 
A HANDLE attribute on procedure handles and the THIS-PROCEDURE system handle that provides a handle to the current transaction object.
TRANS-INIT-PROCEDURE 
A HANDLE attribute on a transaction object handle that, if an automatic transaction is active, returns the procedure handle to the transaction initiating procedure that started the transaction.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095